Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

42 righe
1.0 KiB

  1. <template>
  2. <section>
  3. <img :src="config.public.IMG_BASE_URL + film.poster_path" :alt="film.title">
  4. <span class="">
  5. {{ film.title }}
  6. {{ film.overview }}
  7. {{ director }}
  8. <ul>
  9. <li v-for="star in film.credits.cast">
  10. {{ star.name }}
  11. </li>
  12. </ul>
  13. <ul>
  14. <li v-for="genre in film.genres">
  15. {{ genre.name }}
  16. </li>
  17. </ul>
  18. <!-- {{ film.vote_count }} -->
  19. <!-- {{ film.release_date }} -->
  20. {{ film.vote_average }}
  21. {{ film.vote_count }}
  22. </span>
  23. </section>
  24. </template>
  25. <script setup lang="ts">
  26. const config = useRuntimeConfig()
  27. const film = ref()
  28. const route = useRoute()
  29. const filmId = ref('')
  30. const director = ref('')
  31. filmId.value = route.params.id
  32. if (filmId.value !== '') {
  33. const { data } = await useFetch(`/api/details/${filmId.value}`)
  34. film.value = data.value
  35. director.value = film.value.credits.crew.filter((member) => member.job === 'Director')
  36. director.value = director.value[0].name
  37. }
  38. </script>